home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / gs24src.zip / ECHOQ < prev    next >
Text File  |  1991-09-09  |  336b  |  8 lines

  1. # Figure out what we have to do to get a \ in the output of 'echo'.
  2. # System V `echo' strips \s, but doesn't recognize -n;
  3. # bsd `echo' does the opposite.  Figure out which one we have.
  4.     echo -n >_temp_.echo
  5.     if ( test -s _temp_.echo ) ; then echo $* \\\\; fi
  6.     if ( test \! -s _temp_.echo ) ; then echo $* \\; fi
  7.     rm _temp_.echo
  8.